/*
 * @Description:
 * @version:
 * @Author: 尹鹏孝
 * @Date: 2023-03-15 11:52:22
 * @LastEditors: 尹鹏孝
 * @LastEditTime: 2023-03-15 17:31:12
 */
'use static'
const fs = require('fs');
console.log('======',__dirname)
const files = fs.readdirSync(__dirname).filter(file => file !== 'index.js')
console.log('p:',files)
const controllers={}
for(const file of files){
    if (file.toLowerCase().endsWith('js')) {
        const controller = require(`./${file}`)
        controllers[`${file.replace(/\.js/,'')}`] = controller
    }
}


module.exports = controllers;